package com.kld.common.util;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;

/**
 * Created by Administrator on 2016/3/30.
 */
public class SendMsgUtil {
    private static final Logger logger = LoggerFactory.getLogger(SendMsgUtil.class);
    public  String sendMsg(String phones,String content){
        String result="";
        try {


                String request_url = "";
                URL url = new URL(request_url);
                HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();
                httpURLConnection.setDoOutput(true);
                httpURLConnection.setDoInput(true);
                httpURLConnection.setConnectTimeout(30000);
                httpURLConnection.setReadTimeout(30000);
                httpURLConnection.setRequestMethod("GET");//提交类型
                httpURLConnection.connect();
                //获取返回值
                InputStreamReader   bis = new InputStreamReader(httpURLConnection.getInputStream(),"gb2312");

                int c = 0;
                while((c = bis.read()) != -1)
                {
                    result=result+(char) c;
                }
                bis.close();
        }catch (Exception e){
                logger.info(e.getMessage());
        }
    return "result";
    }
}
